namespace ext.direct
{
	using System;
	using System.Runtime.CompilerServices;
	using System.Html;
	using System.Collections;
	
	
	/// <summary>
	/// Ext.direct.Provider is an abstract class meant to be extended.  For example ExtJs implements the following subclasses:  
	/// Provider
	/// |
	/// +---{@link Ext.direct.JsonProvider JsonProvider}
	/// |
	/// +---{@link Ext.direct.PollingProvider PollingProvider}
	/// |
	/// +---{@link Ext.direct.RemotingProvider RemotingProvider}
	/// </summary>
	/// <htmlSummary>
	/// &lt;p&gt;Ext.direct.Provider is an abstract class meant to be extended.&lt;/p&gt;
	///
	/// &lt;p&gt;For example ExtJs implements the following subclasses:&lt;/p&gt;
	/// &lt;pre&gt;&lt;code&gt;
	/// Provider
	/// |
	/// +---{@link Ext.direct.JsonProvider JsonProvider}
	/// |
	/// +---{@link Ext.direct.PollingProvider PollingProvider}
	/// |
	/// +---{@link Ext.direct.RemotingProvider RemotingProvider}
	/// &lt;/code&gt;&lt;/pre&gt;
	/// </htmlSummary>
	/// <definedin>src\direct\Provider.js</definedin>
	[ScriptName("Provider")]
	[ScriptNamespace("Ext.direct")]
	[Imported()]
	public partial class Provider : ext.util.Observable
	{
		
		#region Constructors
		public Provider(ext.direct.Provider_Configuration config)
		{
		}
		
		/// <summary>Constructor</summary>
		public Provider()
		{
		}
		#endregion
		
		#region Fields
		/// <summary>
		/// The unique id of the provider (defaults to an {@link Ext#id auto-assigned id}).
		/// You should assign an id if you need to be able to access the provider later and you do
		/// not have an object reference available, for example:
		/// 
		/// Ext.Direct.addProvider(
		/// {
		/// type: &apos;polling&apos;,
		/// url: &apos;php/poll.php&apos;,
		/// id: &apos;poll-provider&apos;
		/// }
		/// );
		///
		/// var p = {@link Ext.Direct Ext.Direct}.{@link Ext.Direct#getProvider getProvider}(&apos;poll-provider&apos;);
		/// p.disconnect();
		/// </summary>
		/// <htmlSummary>
		/// The unique id of the provider (defaults to an {@link Ext#id auto-assigned id}).
		/// You should assign an id if you need to be able to access the provider later and you do
		/// not have an object reference available, for example:
		/// &lt;pre&gt;&lt;code&gt;
		/// Ext.Direct.addProvider(
		/// {
		/// type: &apos;polling&apos;,
		/// url: &apos;php/poll.php&apos;,
		/// id: &apos;poll-provider&apos;
		/// }
		/// );
		///
		/// var p = {@link Ext.Direct Ext.Direct}.{@link Ext.Direct#getProvider getProvider}(&apos;poll-provider&apos;);
		/// p.disconnect();
		/// &lt;/code&gt;&lt;/pre&gt;
		/// </htmlSummary>
		/// <definedin>src\direct\Provider.js</definedin>
		[ScriptName("id")]
		public string Id;
		
		/// <summary>
		/// Priority of the request. Lower is higher priority, 0 means &quot;duplex&quot; (always on).
		/// All Providers default to 1 except for PollingProvider which defaults to 3.
		/// </summary>
		/// <htmlSummary>
		/// Priority of the request. Lower is higher priority, &lt;tt&gt;0&lt;/tt&gt; means &quot;duplex&quot; (always on).
		/// All Providers default to &lt;tt&gt;1&lt;/tt&gt; except for PollingProvider which defaults to &lt;tt&gt;3&lt;/tt&gt;.
		/// </htmlSummary>
		/// <definedin>src\direct\Provider.js</definedin>
		[ScriptName("priority")]
		public System.Number Priority;
		
		/// <summary>
		/// Required, undefined by default. The type of provider specified
		/// to {@link Ext.Direct Ext.Direct}.{@link Ext.Direct#addProvider addProvider} to create a
		/// new Provider. Acceptable values by default are:   polling : {@link Ext.direct.PollingProvider PollingProvider}  remoting : {@link Ext.direct.RemotingProvider RemotingProvider}
		/// </summary>
		/// <htmlSummary>
		/// &lt;b&gt;Required&lt;/b&gt;, &lt;tt&gt;undefined&lt;/tt&gt; by default. The &lt;tt&gt;type&lt;/tt&gt; of provider specified
		/// to {@link Ext.Direct Ext.Direct}.{@link Ext.Direct#addProvider addProvider} to create a
		/// new Provider. Acceptable values by default are:&lt;div class=&quot;mdetail-params&quot;&gt;&lt;ul&gt;
		/// &lt;li&gt;&lt;b&gt;&lt;tt&gt;polling&lt;/tt&gt;&lt;/b&gt; : {@link Ext.direct.PollingProvider PollingProvider}&lt;/li&gt;
		/// &lt;li&gt;&lt;b&gt;&lt;tt&gt;remoting&lt;/tt&gt;&lt;/b&gt; : {@link Ext.direct.RemotingProvider RemotingProvider}&lt;/li&gt;
		/// &lt;/ul&gt;&lt;/div&gt;
		/// </htmlSummary>
		/// <definedin>src\direct\Provider.js</definedin>
		[ScriptName("type")]
		public string Type;
		
		/// <summary>Fires when the Provider connects to the server-side</summary>
		/// <definedin>src\direct\Provider.js</definedin>
		[ScriptName("connectEventName")]
		public const string ConnectEventName = "connect";
		
		/// <summary>Fires when the Provider disconnects from the server-side</summary>
		/// <definedin>src\direct\Provider.js</definedin>
		[ScriptName("disconnectEventName")]
		public const string DisconnectEventName = "disconnect";
		
		/// <summary>Fires when the Provider receives data from the server-side</summary>
		/// <definedin>src\direct\Provider.js</definedin>
		[ScriptName("dataEventName")]
		public const string DataEventName = "data";
		
		/// <summary>Fires when the Provider receives an exception from the server-side</summary>
		/// <definedin>src\direct\Provider.js</definedin>
		[ScriptName("exceptionEventName")]
		public const string ExceptionEventName = "exception";
		#endregion
		
		#region Methods
		/// <summary>
		/// Returns whether or not the server-side is currently connected.
		/// Abstract method for subclasses to implement.
		/// </summary>
		/// <definedin>src\direct\Provider.js</definedin>
		[ScriptName("isConnected")]
		public void IsConnected()
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Abstract methods for subclasses to implement.</summary>
		/// <definedin>src\direct\Provider.js</definedin>
		[ScriptName("connect")]
		public void ConnectMethod()
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Abstract methods for subclasses to implement.</summary>
		/// <definedin>src\direct\Provider.js</definedin>
		[ScriptName("disconnect")]
		public void DisconnectMethod()
		{
			throw new System.Exception("Imported - not implemented");
		}
		#endregion
		
		#region Events
		/// <summary>Fires when the Provider connects to the server-side</summary>
		/// <definedin>src\direct\Provider.js</definedin>
		[ScriptName("connect")]
		public event ext.auto.Delegate_ext_direct_Provider Connect;
		
		/// <summary>Fires when the Provider disconnects from the server-side</summary>
		/// <definedin>src\direct\Provider.js</definedin>
		[ScriptName("disconnect")]
		public event ext.auto.Delegate_ext_direct_Provider Disconnect;
		
		/// <summary>Fires when the Provider receives data from the server-side</summary>
		/// <definedin>src\direct\Provider.js</definedin>
		[ScriptName("data")]
		public event ext.auto.Delegate_ext_direct_Provider_And_System_Html_ElementEvent Data;
		
		/// <summary>Fires when the Provider receives an exception from the server-side</summary>
		/// <definedin>src\direct\Provider.js</definedin>
		[ScriptName("exception")]
		public event ext.auto.Delegate_NoParams Exception;
		#endregion
	}
}
